﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using AP.Framework.Infrastructure.Repositories.IRepositories;
using AP.Framework.Utilities.MvcPager;
namespace ApCMS.Areas.Admin.Controllers
{
    public class ChannelController : Controller
    {
        //
        // GET: /Admin/Channel/
        IChannel _channel;
        public ChannelController(IChannel channel)
        {
            _channel = channel;
        }
        public ActionResult Index(int? page)
        {
            var channelList = _channel.GetAll();
            return View(channelList.AsQueryable().OrderBy(p=>p.Sequence).ToPagedList(page ?? 1, 10));
        }

    }
}
